package com.yangxk.kadmin.web.module.system.service.impl;

import com.bstek.ureport.export.ExportManager;
import com.bstek.ureport.export.html.HtmlReport;
import com.yangxk.kadmin.web.module.system.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class ReportServiceImpl implements ReportService {

    @Autowired
    private ExportManager exportManager;

    @Override
    public HtmlReport getReportContent(String filename, Integer num, Map<String, Object> paramMap) {
        if (num == null) {
            return exportManager.exportHtml(filename, "", paramMap);
        }
        return exportManager.exportHtml(filename, "", paramMap, num);
    }

}
